
/*
 * Copyright (C) 2008-2009 Archie L. Cobbs. All rights reserved.
 *
 * $Id$
 */

package org.dellroad.sidekar.query;

import java.util.NavigableSet;

/**
 * Sidekar queries.
 *
 * <p>
 * {@link Query}s are the {@linkplain NavigableSet navigable} collections returned by various Sidekar query operations.
 * </p>
 *
 * <p>
 * {@link Query}s have these properties:
 * <ul>
 * <li>Contained elements iterate in their natural sorting order</li>
 * <li>Associated iterators have a {@link QueryIterator#close} method which can be used to release resources when
 *  no longer needed</li>
 * <li>Instances may allow mutation or may be read-only; this can be determined by invoking {@link #isReadOnly}.</li>
 * </ul>
 * </p>
 */
public interface Query {

    /**
     * Can this query's content be changed, or does it present a read-only view?
     */
    boolean isReadOnly();
}

